GtkBox: Clipped values passed to gtk_distribute_natural_allocation() incase allocated...
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Wed, 18 Aug 2010 23:32:25 +0000 (19:32 -0400)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Thu, 19 Aug 2010 00:01:27 +0000 (20:01 -0400)
gtk/gtkbox.c

index cdc5f1d46fac689c8e158a9ef0b90ffdb7343ab0..1f9b63708d8c635f4ca27c96309b6000624ed4ab 100644 (file)
@@ -500,7 +500,7 @@ gtk_box_size_allocate (GtkWidget     *widget,
   else
     {
       /* Bring children up to size first */
-      size = gtk_distribute_natural_allocation (size, nvis_children, sizes);
+      size = gtk_distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
 
       /* Calculate space which hasn't distributed yet,
        * and is available for expanding children.
@@ -1004,7 +1004,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
   else
     {
       /* Bring children up to size first */
-      size = gtk_distribute_natural_allocation (size, nvis_children, sizes);
+      size = gtk_distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
 
       /* Calculate space which hasn't distributed yet,
        * and is available for expanding children.